    <include file="Public/head"/>
<link href="__PUBLIC__/qwadmin/css/shen/shen.css" rel="stylesheet" type="text/css" />

<body class="no-skin">
<style>
body .demo-class .layui-layer-title{background:#6495ED; color:#fff; border: none;}
body .demo-class .layui-layer-btn{border-top:1px solid #E9E7E7}
body .demo-class .layui-layer-btn a{background:#333;}
body .demo-class .layui-layer-btn .layui-layer-btn1{background:#999;}

body th{
    color:#4F94CD;
    font-size:15px;
}
body td{
    font-size:14px;
}

#tet th{
    text-align: center;
}
#tet td{
    text-align: center;
}

#divv input{
    margin:0px 5px;
}
.dds input{
    margin:0px 5px;
}


.sp {
    border:1px solid #ccc;
    border-radius:50px;
    /*margin-top:30px;*/
}
.sp ul{
    margin-top:20px;
}
.sp ul li{
     float:left;
    margin:3px 10px;
    font-size:15px; 
    margin-left:28px;
}

.sp ul li button{
    width:140px;
    height:40px;
    border:1px solid #ccc;
    border-radius:50px;
}

#xxx ul{
    float:left;
    margin-top:5%;
}

#xxx ul li{
    float:left;
    padding: 5px 15px;
    margin-left:8px;
    font-size:15px;

}

</style>
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
           
                <?php if($lei != 1): ?>
                    <input type="button" value="市内派车申请" style="margin-top:10px;background-color:#fff;border:2px solid #1E90FF;color:#1E90FF;height:40px;width:150px;font-size:17px;box-shadow: 3px 3px 10px #1E90FF;" >&nbsp&nbsp&nbsp&nbsp&nbsp
                    <input type="button" value="市外派车申请" style="margin-top:10px;background-color:#fff;border:2px solid #1E90FF;color:#1E90FF;height:40px;width:150px;font-size:17px;box-shadow: 3px 3px 10px #1E90FF;" onclick="shi()">&nbsp&nbsp&nbsp&nbsp&nbsp
                <?php endif ?>
                <?php if($xing == '1'): ?>
                    <input type="button" value="查看部门派车申请" style="margin-top:10px;background-color:#fff;border:2px solid #1E90FF;color:#1E90FF;height:40px;width:200px;font-size:17px;box-shadow: 3px 3px 10px #1E90FF;" onclick="bu()">
                <?php endif ?>
                <!-- 行政物资审核 -->
                   <div class="row">
                   
                        <div class="widget-box" style="margin-top:30px;height:0px;">

                            <div class="widget-header">

                                <h4 class="widget-title" style="color:#EE0000;">
                                    <label>                 
                                        <span class="lbl"></span>
                                    </label>
                                 <b>{$title}</b>
                                </h4>
                                <div class="widget-toolbar">
                                    <notempty name="v.children">
                                        <a href="#" data-action="collapse">
                                            <i class="ace-icon fa fa-chevron-up"></i>
                                        </a>
                                    </notempty>
                                </div>
                            </div>
                            <notempty name="v.children">
                                <div class="widget-body">
                                    <div style="float:right;margin-top:3px;margin-right:0px;">
                                        <input id="submit" class="btn btn-info" type="button" value="一键通过">
                                        <!-- <button>ju</button> -->
                                    </div>
                                   
                                    <div class="widget-main row" style="height:100%;margin-top:2px;">
                                        <?php if(!empty($list)): ?>
                                                <!-- 行政物资审核 END -->
                                                <div>
                                                <!-- <h4 style="text-align:center;"><b>行政物资申请:</b></h4> -->
                                                <form id="form" method="post" action="{:U('Shenp/qtong')}">
                                                <table class="table table-bordered" style="margin-top:5px;">
                                                    <thead>
                                                        <tr>
                                                            <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                                            <th class="center">编号</th>
                                                            <th class="center">类型</th>
                                                            <th class="center">出发地</th>
                                                            <th class="center">目的地</th>
                                    
                                                            <th class="center">开始时间</th>
                                                            <th class="center">申请缘由</th>

                                                            <th class="center">申请人</th>
                                                            <th class="center">所属部门</th>
                                                            <th class="center">申请时间</th>
                                                            <th class="center">操作</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                    <volist name="list" id="v">
                                                        <tr>
                                                            <td class="center">
                                                            <input class="uids" type="checkbox" name="uids[]" value="{$v['id']}">
                                                            </td>
                                                            <td class="center" id="ddi">{$v.id}</td>                                                   
                                                            <?php if($v['type'] == 1): ?>
                                                                <td class="center" id="ddi" style="color:#00DB00;font-size:17px;">市内派车</td>    
                                                            <?php else: ?>
                                                                <td class="center" id="ddi" style="color:#F75000;font-size:17px;">市外派车</td>
                                                            <?php endif ?>                                               
                                                            <td class="center">
                                                              {$v.c_place}
                                                            </td>                                                   
                                                            <td class="center">{$v.d_place}</td>                                                   
                                                            <td class="center" style="color:#FFA500">{$v.k_time}</td>
                                                            <td class="center" >{$v.cont}</td>
                                                          
                                                            <td class="center">{$v.uname}</td>
                                                            <td class="center">{$v.ment}</td>
                                                            <td class="center">{$v.time}</td>
                                                          
                                                                <td class="center" style="">
                                                                <div onclick="xtong({$v.id},this)" class="tong">通过</div>
                                                                <div onclick="yju({$v.id},this)" class="jujue">拒绝</div>
                                                                </td>
                                                          
                                                            
                                                        </tr>
                                                    </volist>
                                                    </tbody>
                                                </table>
                                                 </form>
                                                <!-- 行政物资审核 END -->
                                                {$page}
                                        <?php endif ?>
                                                </div>
                                        <hr>
            

            <div class="form-group yyy" style="display:none;position:absolute;width:600px;height:200px;background-color:#E6E6FA;border:1px solid #ccc;box-shadow: 7px 7px 5px #888888;top:110%;left:30%;" id="centen">
            <form action="" id="formid">
                <label for="exampleInputEmail1" style="margin-top:20px;"><b style="font-size:17px;">请写下拒绝原因:</b></label>  
                <textarea class="form-control" rows="3" name="cent" style="width:90%;margin-left:30px;" placeholder="请输入拒绝缘由...."></textarea><br>
                <input type="hidden" class="ii" name="id">
                <input type="hidden"  name="type" value="1">
                <input id="tiju" class="btn btn-danger" type="button" value="提交" style="width:200px;">
                <input type="button" class="btn btn-info"  value="关闭" onclick="guan()">
            </form>
            </div>

         
                    
                     


                


            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <!-- <include file="Public/footer"/> -->

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
<script>


function shi()
{
    location.href="{:U('Che/chew')}";
}

function yju(id,obj)
{


    
    $(".ii").val(id);
    $('.yyy').show();




}
$("#tiju").click(function () {
         
    //询问框
    layer.confirm('确定提交么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
             type: "POST",
             url:"{:U('Che/cju')}",
             data:$('#formid').serialize(),// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                if (msg == 1111) {
                    layer.msg('已拒绝!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                    history.go(0); 
                }else{
                    layer.msg('申请失败,请重新再试!');
                }
             },
            complete: function() {
                layer.closeAll('loading');
            }
        });
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });
     
            
});

function bu()
{
    location.href="{:U('Che/bushen')}";
}




function xtong(id,obj)
{
    var lei = 1;
    //询问框
    layer.confirm('确定通过么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
                url:"{:U('Shenp/csh')}",
                type: 'post',
                data:{'id':id,'lei':lei},
                dataType:'json',
                beforeSend:function(){
                  layer.load(0, {shade: false});
                },
                success:function(msg){
                    if (msg == 1111) {
                        layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                        history.go(0); 
                        $(obj).parent().html('[审核通过!!]').css({'color':' #7FFF00','font-width':'900'});
                    }else{
                        layer.msg('申请失败,请重新再试!');
                    }
                },
                complete: function() {
                    layer.closeAll('loading');
                }
            })
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });



}




function xju(id,obj)
{
    var lei = 1;
    //询问框
    layer.confirm('真的要拒绝么? ∑(っ °Д °;)っ', {
      btn: ['确定','取消'] //按钮
    }, function(){
        $.ajax({
                url:"{:U('Shenp/cju')}",
                type: 'post',
                data:{'id':id,'lei':lei},
                dataType:'json',
                beforeSend:function(){
                    layer.load(0, {shade: false});
                },
                success:function(msg){
                     if (msg == 1111) {
                        layer.msg('已经拒绝啦╮(╯▽╰)╭', {icon: 1});
                        history.go(0); 
                        $(obj).parent().html('[已被拒绝!!]').css({'color':'red','font-width':'900'});
                    }else{
                        layer.msg('申请失败,请重新再试!');
                    }
                },
                complete: function() {
                    layer.closeAll('loading');
                }
        })
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });


}



function guan()
{
    $('#centen').hide();
}



$(".check-all").click(function () {
            $(".uids").prop("checked", this.checked);
        });
$(".uids").click(function () {
        var option = $(".ids");
        option.each(function (i) {
            if (!this.checked) {
                $(".check-all").prop("checked", false);
                return false;
            } else {
                $(".check-all").prop("checked", true);
            }
        });
    });

$("#submit").click(function () {
    //询问框
    
    layer.confirm('确定通过么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
             type: "POST",
             url:"{:U('Che/ctong')}",
             data:$('#form').serialize(),// 要提交的表单 
             beforeSend:function(){
                    layer.load(0, {shade: false});
                },
             success: function(msg) {
                if (msg == 1111) {
                    layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                    history.go(0); 
                }else{
                    layer.msg('申请失败,请重新再试!');
                }
             },
            complete: function() {
                layer.closeAll('loading');
            }
         });
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });     
        
            
});





</script>


</body>

</html>
